<?php

require_once 'appinclude.php';

$bandName = $_GET['bandName'];
if (isset($_REQUEST['name'])) {
  $facebook->api_client->profile_setFBML($_REQUEST['name'], $user);
  $facebook->redirect($facebook->get_facebook_url() . '/profile.php');
}

echo '<link rel="stylesheet" href="rockbandstyle.css" type="text/css" media="all"/>
<div style="padding:20px;">
<div class="nav"><span class="nav"><a href="index.php">My Stats  </a> | <a href="index.php">New Band  </a>|<a href="index.php"> Some other link </a></span><br />
  <br />

<div style="border-top: 1px solid #d8dfea; border-bottom: 1px solid #d8dfea; padding: 10px 20px; background: #f7f7f7 none repeat scroll 0% 0%; border-left: 1px solid #d8dfea; border-right: 1px solid #d8dfea; width: auto;">
  <h3>Rock Band Stats </h3>
</div>
</div>
<br />';

echo "<fb:name uid=" . $user . " useyou='false' possessive='false' firstnameonly='true'/>, the band name " . $bandName . " does not exist. 
<br />Try one of the following to troubleshoot the issue:<br />
<ul>
<li>Register with <a href='http://www.rockband.com/rockers_home'>The official Rock Band Community</a>
</li>
<li>Link your game data to the official stats as descibed on the official page
</li>
<li>Maybe it was a typo, try entering the band name below
</li>
</ul>
<br /><br />";

//echo "<pre>Debug:" . print_r($facebook,true) . "</pre>";

echo '<form id="form1" name="form1" method="post" action="eval2.php">';
echo '  <input name="name" type="text" id="name" />';
echo '  <input type="submit" name="Submit" value="Retry!" />';
echo '</form><br></div></div>';
?>